
[#macro payconfigShowView]
<div  class="model-form">
    <el-page-header @back="goBack" content="详情">
    </el-page-header>

        <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
            <el-menu-item index="1">
                支付配置详情
            </el-menu-item>
        </el-menu>
        <div>
            <router-view></router-view>
        </div>

</div>
[/#macro]
[#macro payconfigShowConfig]
<script type="text/x-template" id="my-payconfig-show">
    [@payconfigShowView /]
</script>
	<script type="text/javascript">
		//显示组件开始
		var payconfigShowConfig = {};
		payconfigShowConfig.template = "#my-payconfig-show";
		payconfigShowConfig.methods =config.basicMethod();
		payconfigShowConfig.data = function () {
			return {
				viewModel: {
				},
				activeIndex: "1"
			}
		};

		payconfigShowConfig.methods.handleSelect = function (index) {
			console.log(index)
			var selectId = this.selectId;
			if (index == "1") {
				this.$router.replace({ path: '/view/index', query: { id: selectId, activeIndex: 1, time: Math.random() } })
			}
			else if (index == "2") {
				this.$router.replace({ path: '/view/members', query: { id: selectId, activeIndex: 2, time: Math.random() } })
			} else {

			}
		};

		payconfigShowConfig.mounted = function () {
		   	var id = this.$route.query.id;
			var activeIndex = this.$route.query.activeIndex;

			var self = this;
			var data = {};
			data.id = id;
			this.selectId = data.id;
			if (activeIndex) {
				this.activeIndex = activeIndex;
			}
		}
		var payconfigShowView = Vue.component('my-payconfig-view', payconfigShowConfig);
		//显示组件结束		
	</script>
[/#macro]



[#macro childPayconfigView]
    <div >
        <el-form class="viewForm" label-width="80px">
            <el-col :span="12">
                <el-form-item label="支付标识">
                    <div v-html="viewModel.key">></div>
                </el-form-item>
            </el-col>
            <el-col :span="12">
                <el-form-item label="支付名称">
                    <div v-html="viewModel.name">></div>
                </el-form-item>
            </el-col>
            <el-col :span="12">
                <el-form-item label="支付模式">
                    <div v-html="viewModel.payTypeName">></div>
                </el-form-item>
            </el-col>
            <el-col :span="12">
                <el-form-item label="服务商Id">
                    <div v-html="viewModel.platformId">></div>
                </el-form-item>
            </el-col>
            <el-col :span="12">
                <el-form-item label="服务商户号">
                    <div v-html="viewModel.platformMchId">></div>
                </el-form-item>
            </el-col>
            <el-col :span="12">
                <el-form-item label="appId">
                    <div v-html="viewModel.appId">></div>
                </el-form-item>
            </el-col>
            <el-col :span="12">
                <el-form-item label="商户号">
                    <div v-html="viewModel.mchId">></div>
                </el-form-item>
            </el-col>
            <el-col :span="12">
                <el-form-item label="商户Key">
                    <div v-html="viewModel.mchKey">></div>
                </el-form-item>
            </el-col>
            <el-col :span="12">
                <el-form-item label="证书路径">
                    <div v-html="viewModel.keyPath">></div>
                </el-form-item>
            </el-col>
            <el-col :span="12">
                <el-form-item label="通知Url">
                    <div v-html="viewModel.notifyUrl">></div>
                </el-form-item>
            </el-col>
            <el-col :span="12">
                <el-form-item label="费率">
                    <div v-html="viewModel.rate">></div>
                </el-form-item>
            </el-col>
            <el-col :span="12">
                <el-form-item label="备注">
                    <div v-html="viewModel.note">></div>
                </el-form-item>
            </el-col>
        </el-form>
    </div>
 [/#macro]

[#macro childPayconfigConfig]
    <script type="text/x-template" id="child-payconfig-show">
        [@childPayconfigView /]
    </script>
    <script type="text/javascript">

        var childPayconfigShowConfig = {};
        childPayconfigShowConfig.template = "#child-payconfig-show";
        childPayconfigShowConfig.methods = config.basicMethod();
        childPayconfigShowConfig.data = function () {
            return {
                viewModel: {
                }
            }
        };
        childPayconfigShowConfig.mounted = function () {
            var id = this.$route.query.id;
            var self = this;
            var data = {};
            data.id = id;
            this.postData("${siteurl}tenantRest/payconfig/view.htm", data, function (res) {
                if (res.code == 0) {
                    self.viewModel = res;

                }
            });
        }
        var childPayconfigShowView = Vue.component('child-payconfig-show', childPayconfigShowConfig);
    </script>
[/#macro]

